<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix = "s" uri ="/struts-tags" %> 
<%@ taglib prefix = "pg" uri="http://jsptags.com/tags/navigation/pager" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
   <center>
   	<h2>教师即将报名截止项目列表</h2>
   	<table border="1">
   		<tr>
   			<td width="100">项目ID</td>
   			<td width="100">项目名</td>
   			<td width="50">状态</td>
   			<td width="50">开始时间</td>
   			<td width="50">报名截止时间</td>
   			<td width="50">研究领域</td>
   			<td width="50">停止发布</td>
   			<td width="50">删除</td>
   		</tr>
   		<s:iterator value="#request.pm.datas" id="project">
   		<tr>
   			<td><a href="adminAction!modifyProject?proid=<s:property value='#project.pid'/>"><s:property value="#project.pid"/></a></td>
   			<td><s:property value="#project.name"></s:property></td>
   			<td><s:property value="#project.status"></s:property></td>
   			<td><s:property value="#project.startTime"></s:property></td>
   			<td><s:property value="#project.endtTime"></s:property></td>
   			<td><s:property value="#project.field"></s:property></td>
   			<td><a href="projectAction!overProject?Pid=<s:property  escape="false" value='#project.pid'/>" >停止发布</a></td>		
   			<td><a href="adminAction!deleteProject?proid=<s:property  escape="false" value='#project.pid'/>" >删除</a></td>
   			
   		</tr>
   		
   		</s:iterator>
   	</table>
   	
   	<pg:pager url="adminAction!pageTagLib"  items="${pm.total}" export="currentPageNumb=pageNumber" maxPageItems="3">
   		<pg:first>
   			<a href="${pageUrl}">首页</a>
   		</pg:first>
   		<pg:prev>
   			<a href="${pageUrl}">上一页</a>
   		</pg:prev>
   		<pg:pages>
   			<c:choose>   			
   				<c:when test="${currentPageNumber eq pageNumber}">
					<font color="red">${pageNember}</font>
   				</c:when>
   				<c:otherwise>
   					<a href="${pageUrl}">${pageNumber}</a>
   				</c:otherwise>
   			</c:choose>
   		</pg:pages>
   		<pg:next>
   			<a href="${pageUrl}">下一页</a>
   		</pg:next>
   		<pg:last>
   			<a href="${pageUrl}">尾页</a>
   		</pg:last>
   	</pg:pager>
   </center>
</body>
</html>